package bitekeji.day2.read;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class ReadFile2 {
    public static void main(String[] args) throws IOException {
        try (InputStream is = new FileInputStream("D:\\软件安装\\jdk-8u261-windows-x64.exe")) {
            long s = System.currentTimeMillis();
            while (true) {
                int b = is.read();
                if (b == -1) {
                    break;
                }
            }
            long e = System.currentTimeMillis();
            System.out.println(e - s);
        }
    }
}
